"use strict";
/* Controllers */
app.controller("xinghuoKanbanController", ['$scope', '$location', '$rootScope', '$routeParams', 'xinghuoKanbanService', function ($scope, $location, $rootScope, $routeParams, xinghuoKanbanService) {

    var vm = $scope.vm = {};

    vm.p = {};
    vm.result = {};
    vm.p.id = $routeParams.id;
    vm.p.url = '';

    $scope.loadUrl = function (id) {
        var vm = $scope.vm;
        var idxUrl = function(id) {
            if (id == null) {
                return "-";
            }
            switch (id) {
                case "1":// 数据源拆分zpsrc监控
                    return "https://wuba.xinghuo.58.com/visualization/share/13473?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%223ebfc111f12b9430815b32bf59c1d52b%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "2":// HRG数据治理-数据质量看板
                    return "https://wuba.xinghuo.58.com/visualization/share/13472?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%222c10f96efaddcf597ea046532ff71708%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "3":// HRG数据治理-指标质量看板
                    return "https://wuba.xinghuo.58.com/visualization/share/14482?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%225aa8c92508dc82cd4c8b8530613202f3%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
               case "31": // 成本统计看板
                    return "https://wuba.xinghuo.58.com/visualization/share/15154?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22b7228934034808871a68cc0c3e70ed34%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;

                case "8":// DP任务每天上线情况统计
                    return "https://wuba.xinghuo.58.com/visualization/share/13214?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22d3c637cbdbb05e887e13d5107cb9a2f2%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "24": //实时数据质量
                    return "https://wuba.xinghuo.58.com/visualization/share/13213?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22661c3e784c5ba7ce8dcf4d7f887048f1%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "25": // 数据清理-同路径
                    return "https://wuba.xinghuo.58.com/visualization/share/13430?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22e237647eedb7e4a37727aab8e90b03fd%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "26":// 数据清理-待清理
                    return "https://wuba.xinghuo.58.com/visualization/share/13432?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22eb33ed36f5f9f21ba55cfc2fd4c65f5a%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "41":// 数据完整性报告
                    return "https://wuba.xinghuo.58.com/visualization/share/13481?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%2238e9b2fc82d9af09e812c3a143e8290a%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "42":// 数据准确性报告
                    return "https://wuba.xinghuo.58.com/visualization/share/13480?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22f5baf73b2866b2ed447a847adec27e44%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "43":// 数据时效性报告
                    return "https://wuba.xinghuo.58.com/visualization/share/13482?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%221c5092c31a4132910062bdd895420f7f%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "44":// 数据一致性报告
                    return "https://wuba.xinghuo.58.com/visualization/share/13483?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22fb1ad3a0cd12e4963af3686a17e5fe7d%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";

                case "51":// 数据治理-点击串联
                    return "https://wuba.xinghuo.58.com/visualization/share/14490?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%2211c2f3a197669a5ed1fea4d2f0253cc4%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "52":// 数据治理-连接串联
                    return "https://wuba.xinghuo.58.com/visualization/share/14491?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22d08dc18477509a8af88780f6d5e79609%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "53":// 数据治理-摊销串联
                    return "https://wuba.xinghuo.58.com/visualization/share/14492?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22cdcc5da35f6a279ce7df53c964bbc379%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                case "61":// 【HRG数据治理】-未认领表
                    return "https://wuba.xinghuo.58.com/visualization/share/14460?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%22e7992a2c4d3951a18b7764ecdd4b7db3%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "62":// 【HRG数据治理】未设置生命周期表
                    return "https://wuba.xinghuo.58.com/visualization/share/14463?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%2229c60bef0eadd3a6b0ba3fbccbc9cd3f%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "63":// 【HRG数据治理】数仓0热度表
                    return "https://wuba.xinghuo.58.com/visualization/share/14464?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%225e8d8f923075c56900619c5ac07709e5%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "64":// 【HRG数据治理】2TB表生命周期管理
                    return "https://wuba.xinghuo.58.com/visualization/share/14797?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%2263c7ac1227d1b967a40e0fc59b81f94e%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                case "65": // 【HRG数据治理】P0级任务依赖管理
                    return "https://wuba.xinghuo.58.com/visualization/share/14798?api_params=%7B%22appid%22%3A211%2C%22appsign%22%3A%2211e5fd2fd3d8e34b1435487fb6a574f2%22%7D&filter_params=%7B%7D&dataset_params=%5B%5D";
                    break;
                default:
                    return "https://wuba.xinghuo.58.com/visualization/share/"+id;
                    break;
            }
            return location + url;
        };
        vm.p.url = idxUrl(id);
        console.log(vm.p.url);
    };
    $scope.loadUrl(vm.p.id);
}]);


/* Services */
app.service('xinghuoKanbanService', ['ajaxService', function (ajaxService) {

}]);


